﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using S4Store.Domain;
using S4Store.Domain.CarKpi;
using S4Store.Domain.SellerKpi;
using S4Store.Domain.NetMarketingKpi;

namespace S4Store.Models.NetMarketing
{
    public class InputDayDataModel
    {
        public List<NetMarketingMedia> Medias { get; set; }

        public List<NetMarketingKpiDayData> DayDatas { get; set; }
        public DateTime Date { get; set; }

        public NetMarketingKpiDayData GetDayData(int medisid)
        {
            var data = DayDatas.FirstOrDefault(t => t.MediaId == medisid);
            if(data==null)
            {
                data = new NetMarketingKpiDayData();
                data.Date = Date;
            }
            return data;
        }

        public bool IsConfirmed { get; set; }

    }
}